<template>
	<view>
		<uv-cell-group v-for="com in series" :key="com.name" :title="com.name" :border="false">
			<uv-cell v-for="se in com.child" :key="se.name" :title="se.name" isLink @click="totype(se)"></uv-cell>
		</uv-cell-group>
	</view>
</template>

<script>
	import { getSubBrandInfoByBrand } from '@/utils/http.js'
	export default {
		data() {
			return {
				series: [],
				urlparm: {}
			}
		},
		onLoad(option) {
			const item = JSON.parse(decodeURIComponent(option.items))
			this.urlparm = item
			this.getseries()
		},
		methods: {
			getseries() {
				const parm = { brandid: this.urlparm.brand.id }
				getSubBrandInfoByBrand(parm).then(res => {
					this.series = res.data
				})
			},
			totype(cell) {
				const item = this.urlparm
				item.series = cell
				const url = '/pages/brand/type?items=' +
					encodeURIComponent(JSON.stringify(item))
				uni.navigateTo({ url: url })
			}
		}
	}
</script>

<style>
page{
	background: #fff !important;
}
.uv-cell-group__title{
	background: #f3f4f6;
	padding: 28upx 30upx !important;

}
.uv-cell-group__title__text{
	color: #909193 !important;
	font-size: 30upx !important;
}
.uv-cell__title-text{
	font-size: 28upx !important;
}
</style>